import request from "@/utils/request";

// 获取待我审核
export function FlowBeforeList(category, data, options) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/List/${category}`,
		method: "get",
		data,
		options: {
			load: false,
		},
	});
}
// 获取待我审批信息
export function FlowBeforeInfo(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/${id}`,
		method: "get",
		data,
	});
}
// 待我审核审核
export function Audit(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/Audit/${id}`,
		method: "post",
		data,
	});
}
// 待我审核驳回
export function Reject(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/Reject/${id}`,
		method: "post",
		data,
	});
}
// 撤回审核
export function Recall(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/Recall/${id}`,
		method: "post",
		data,
	});
}
// 待我审核转审
export function Transfer(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/Transfer/${id}`,
		method: "post",
		data,
	});
}
// 审批汇总
export function getRecordList(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/RecordList/${id}`,
		method: "get",
		data,
	});
}
// 待我审核保存草稿
export function SaveAudit(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/SaveAudit/${id}`,
		method: "post",
		data,
	});
}
// 判断是否有候选人
export function Candidates(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/Candidates/${id}`,
		method: "post",
		data,
	});
}
// 获取候选人列表（分页）
export function CandidateUser(id, data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/CandidateUser/${id}`,
		method: "post",
		data,
	});
}
export function getInfo(data) {
	return request({
		url: `/api/SubDev/Purtc/getInfo`,
		method: "get",
		data,
	});
}

export function getAsttiInfo(data) {
	return request({
		url: `/api/SubDev/Astti/getInfo?id=${data}`,
		method: "get",
	});
}
export function getAsttiInfozz(data) {
	return request({
		url: `/api/SubDev/Astti/getInfo_ZZ?id=${data}`,
		method: "get",
	});
}

export function getMoctaInfo(data) {
	return request({
		url: `/api/SubDev/Mocta/getInfo`,
		method: "get",
		data,
	});
}
export function getAsttmInfo(data) {
	return request({
		url: `/api/SubDev/Asttm/getInfo`,
		method: "get",
		data,
	});
}

export function getPurteInfo(data) {
	return request({
		url: `/api/SubDev/Purte/getInfo`,
		method: "POST",
		data,
	});
}
export function getInvtaInfo(data) {
	return request({
		url: `/api/SubDev/Invta/getInfo`,
		method: "get",
		data,
	});
}

export function getApstaInfo(id, data) {
	return request({
		url: `/api/SubDev/Apsta/${id}`,
		method: "get",
		data,
	});
}
export function getAsttoInfo(id) {
	return request({
		url: `/api/SubDev/Astto/GetFlowInfo`,
		method: "get",
		data: id,
	});
}
export function getCoptaInfo(query) {
	return request({
		url: `/api/SubDev/Copta/getInfo`,
		method: "get",
		data: query,
	});
}
export function getPjswaInfo(query) {
	return request({
		url: `/api/SubDev/Pjswa/`,
		method: "get",
		data: query,
	});
}
export function getCoptiInfo(id) {
	return request({
		url: `/api/SubDev/Copti/GetFlowInfo/${id}`,
		method: "get",
	});
}

export function getAdvancePaymentWithFlowInfo(id, data) {
	return request({
		url: `/api/SubDev/AdvancePaymentWithFlow/${id}`,
		method: "get",
		data,
	});
}

export function getWaitTotal(data) {
	return request({
		url: `/api/workflow/Engine/FlowBefore/GetWaitTotal`,
		method: "get",
		data,
	});
}
export function getFlowMonitor(data) {
	return request({
		url: `/api/workflow/Engine/FlowMonitor`,
		method: "get",
		data,
	});
}
export function getBomca(data) {
	return request({
		url: `/api/SubDev/Bomca/getInfo`,
		method: "get",
		data,
	});
}
export function getBomta(data) {
	return request({
		url: `/api/SubDev/Bomta/getInfo`,
		method: "get",
		data,
	});
}
// export function getBomca(data) {
// 	return request({
// 		url: `/api/SubDev/Bomca/getInfo`,
// 		method: 'get',
// 		data
// 	})
// }
//获取BOMCB变更单身信息
export function BomcbListInit(data) {
	return request({
		url: `/api/Extend/NumberInfo/getBomcbList`,
		method: "get",
		data,
	});
}
//获取BOMCB变更单身信息
export function getDataInterface(id, data) {
	return request({
		url: `/api/system/DataInterface/${id}/Action/Info`,
		method: "get",
		data,
	});
}
//获取费用预算信息
export function getOaste(id) {
	return request({
		url: `/api/SubDev/Oaste/${id}`,
		method: "get",
	});
}
//保存费用预算信息
export function putOaste(id, data) {
	return request({
		url: `/api/SubDev/Oaste/${id}`,
		method: "put",
		data,
	});
}
//保存和提交费用申请
export function putOastg(id, data) {
	return request({
		url: `/api/SubDev/Oastg/${id}`,
		method: "put",
		data,
	});
}
//保存和提交借款单
export function putOasti(id, data) {
	return request({
		url: `/api/SubDev/Oasti/${id}`,
		method: "put",
		data,
	});
}
//保存和提交借款单
export function putOastl(id, data) {
	return request({
		url: `/api/SubDev/Oastl/${id}`,
		method: "put",
		data,
	});
}
//保存和提交费用报销单
export function putOasta(id, data) {
	return request({
		url: `/api/SubDev/Oasta/${id}`,
		method: "put",
		data,
	});
}
// 提交费用预算信息
export function postOaste(data) {
	return request({
		url: `/api/SubDev/Oaste`,
		method: "post",
		data,
	});
}
export function postOasta(data) {
	return request({
		url: `/api/SubDev/Oasta`,
		method: "post",
		data,
	});
}
// 获取新增费用预算的预算编号
export function getOasteBudgetNo() {
	return request({
		url: `/api/SubDev/Oaste/generateBudgetNo`,
		method: "get",
	});
}
export function getOastaBudgetNo() {
	return request({
		url: `/api/SubDev/Oasta/generateClaimNumber`,
		method: "get",
	});
}
// 获取新增费用申请单的预算编号
export function getOastgBudgetNo() {
	return request({
		url: `/api/SubDev/Oastg/generateFeeApply`,
		method: "get",
	});
}
// 获取新增借款单的借款单号
export function getOastiBudgetNo() {
	return request({
		url: `/api/SubDev/Oasti/generateLoanOrderNumber`,
		method: "get",
	});
}
// 获取新增还款单的还款单号
export function getOastlBudgetNo() {
	return request({
		url: `/api/SubDev/Oastl/paymentOrderNumber`,
		method: "get",
	});
}
// 提交还款单信息
export function postOastl(data) {
	return request({
		url: `/api/SubDev/Oastl`,
		method: "post",
		data,
	});
}
// 提交借款单信息
export function postOasti(data) {
	return request({
		url: `/api/SubDev/Oasti`,
		method: "post",
		data,
	});
}
// 提交费用申请单
export function postOastg(data) {
	return request({
		url: `/api/SubDev/Oastg`,
		method: "post",
		data,
	});
}
// 获取费用类型
export function getOastdList(data) {
	return request({
		url: `/api/SubDev/Oastd/getOastdList`,
		method: "get",
		data,
	});
}
// 获借款单号
export function getOastdboxList(data) {
	return request({
		url: `/api/SubDev/Oasti/boxList`,
		method: "get",
		data,
	});
}


//获取费用预算信息
export function getOastg(id) {
	return request({
		url: `/api/SubDev/Oastg/${id}`,
		method: "get",
	});
}
//获取费用报销单
export function getOasta(id) {
	return request({
		url: `/api/SubDev/Oasta/${id}`,
		method: "get",
	});
}
//获取收款人单位
export function getPersonBankInfo(data) {
	return request({
		url: `/api/SubDev/Oasta/getPersonBankInfo`,
		method: "get",
		data: data
	});
}
//获取借款单
export function getOasti(id) {
	return request({
		url: `/api/SubDev/Oasti/${id}`,
		method: "get",
	});
}
//获取还款单
export function getOastl(id) {
	return request({
		url: `/api/SubDev/Oastl/${id}`,
		method: "get",
	});
}
export function getCoptg(id) {
	return request({
		url: `/api/SubDev/Coptg/${id}`,
		method: 'get',

	})
}